AC_DEFUN([AC_SR_DOC],
[
	# Sphinx
	AC_CHECK_PROG(SPHINXBUILD,sphinx-build,sphinx-build)
	AS_VAR_SET(HAS_DOC_SUPPORT,AS_VAR_TEST_SET(SPHINXBUILD))
	AM_CONDITIONAL([HAS_DOC_SUPPORT],AS_VAR_GET(HAS_LATEX_SUPPORT))
#	AC_SUBST(HAS_DOC_SUPPORT)
	AC_SUBST(SPHINXBUILD)
	
	# Pdflatex
	AC_CHECK_PROG(PDFLATEX,pdflatex,pdflatex)
	AS_VAR_SET(HAS_LATEX_SUPPORT,AS_VAR_TEST_SET(PDFLATEX))
	AM_CONDITIONAL([HAS_LATEX_SUPPORT],AS_VAR_GET(HAS_LATEX_SUPPORT))
#	AC_SUBST(HAS_LATEX_SUPPORT)
	AC_SUBST(PDFLATEX)
])